import pkg_resources
import os
REQUIRED_PACKAGES = [
    'numpy',
    'torch',
    'scikit-learn',
    'matplotlib',
    'opencv-python',
    'torchvision',
    'scipy',
    # 添加你需要的其他包
]

for package in REQUIRED_PACKAGES:
    try:
        dist = pkg_resources.get_distribution(package)
        print('{} ({}) is installed'.format(dist.key, dist.version))
    except pkg_resources.DistributionNotFound:
        print('{} is NOT installed'.format(package))
print('All packages are successfully installed!')
os.mkdir('bg_img')
os.mkdir('output')